//
//  TodoHttpManager.m
//  JinChengYun
//
//  Created by 金橙云 on 2017/3/7.
//  Copyright © 2017年 金橙云. All rights reserved.
//

#import "TodoHttpManager.h"

#import "CJMD5.h"//MD5加密
#import "DejalActivityView.h"
#import "LoginViewController.h"
#import "AppDelegate.h"
#import <AVFoundation/AVFoundation.h>

#ifdef DEBUG
#define NSLog(format, ...) printf("[%s] %s [第%d行] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]);
#else
#define NSLog(format, ...)
#endif

static TodoHttpManager *shareManager = nil;


@implementation TodoHttpManager



#pragma mark 初始化
-(id)init
{
    if (self = [super init])
    {
        requestQueue = [[ASINetworkQueue alloc]init];
        [requestQueue setDelegate:self];
        [requestQueue setRequestDidFailSelector:@selector(requestFailed:)];//失败的回调 点进去
        [requestQueue setRequestDidFinishSelector:@selector(requestFinished:)];//成功的回调
        [requestQueue setMaxConcurrentOperationCount:1];//一次只执行一个请求
        [requestQueue go];
        self.serveURLString = SERVE_URL;
        
        
    }
    return self;
}

#pragma mark 单例的实现
+(TodoHttpManager *)sharedManager
{
    @synchronized (self)
    {
        if (shareManager == nil)
        {
            shareManager = [[TodoHttpManager alloc] init];
        }
    }
    return shareManager;
}

#pragma mark  未登录跳转至登录页面
-(void)TurnToLogin
{
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"SID"];
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"USER_NAME"];
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"PASS_WORD"];
    
    LoginViewController *loginVC = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
    UINavigationController* loginVa = [[UINavigationController alloc]initWithRootViewController:loginVC];
    loginVC.delegate = self.delegate;//代理循环传递
    [self.delegate window].rootViewController = loginVa;
    
    
    
}

#pragma mark Loading...
-(void)Netindicator:(BOOL)_goOrstop andStartStr:(NSString*)_str
{
    AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    if (_goOrstop)
    {
        [app startLoadingWithLabelStr:nil];
    }
    else
    {
        [app stopLoading];
    }
    
}

#pragma mark 单一登录接口
-(void)userOnlyLoginWithName:(NSString *)_name
{
    
    [self Netindicator:YES andStartStr:nil];
    NSString *urlStr = [NSString stringWithFormat:@"%@",ONLY_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
    
    [request setPostValue:_name forKey:@"name"];

    request.timeOutSeconds = 10;
    [self setGetUserInfo:request withRequestType:UserOnlyLogin WithNotifiType:TDOnlyLogin];
    
    [requestQueue addOperation:request];

}
#pragma mark 登录请求

-(void)userGetLoginWithUserName:(NSString *)_name andPwd:(NSString *)_pasWd andUid:(NSString *)_uid
{
    [self Netindicator:YES andStartStr:nil];
//    NSLog(@"-----------能取到吗?0-----%@",SERVE_URL);
    NSString *urlStr = [NSString stringWithFormat:@"%@%@",SERVE_URL,GET_LOGIN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
    
    [request setPostValue:_name forKey:@"name"];
    [request setPostValue:_pasWd forKey:@"password"];
    [request setPostValue:_uid forKey:@"uid"];
    request.timeOutSeconds = 10;
    [self setGetUserInfo:request withRequestType:UserGetLogin WithNotifiType:TDGetLogin];
    
    [requestQueue addOperation:request];
    
}

#pragma mark 佣金分析--物业类型下拉
-(void)userYongJinWuYeType
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,YONGJIN_WUYE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UseGetYongJinWuTe WithNotifiType:TDYongJinWuYeType];
    [requestQueue addOperation:request];

}
#pragma mark 均价动态--物业类型获取
-(void)userJunJiaDongTaiWuYeType
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,JUNJIA_WUYE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetJunJiaWuYeType WithNotifiType:TDJunJIaWuYeType];
    [requestQueue addOperation:request];

}

#pragma mark 佣金管理--置业顾问
-(void)userYongJinGuanLiZhiYeGuWen
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,YONGJIN_ZHIYEGUWEN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetYongJinZhiYeGuWen WithNotifiType:TDYongJinZhiYeGuWen];
    [requestQueue addOperation:request];

}

#pragma mark 个人信息获取
-(void)userGetMineInfoGetWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *urlStr = [NSString stringWithFormat:@"%@%@",SERVE_URL,GET_MINE_GETINFO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
   // ASIFormDataRequest *request = [self MakeMD5Request:GET_MINE_GETINFO_URL andRequestTimeOut:10];
    [self setGetUserInfo:request withRequestType:UserGetMineGetInfo WithNotifiType:TDGetMineGetInfo];//点进去
    [request setPostValue:_id forKey:@"id"];
    [requestQueue addOperation:request];

    
}

#pragma mark 个人信息修改
-(void)userGetMineInfoSetHeadImage:(NSString *)_image andName:(NSString *)_name andUserID:(NSString *)_userId andPwd:(NSString *)_pwd andPhone:(NSString *)_phone
{
     [self Netindicator:YES andStartStr:nil];
    NSString *urlStr = [NSString stringWithFormat:@"%@%@",SERVE_URL,GET_MINE_SETINFO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlStr]];
    [request setPostValue:_image forKey:@"img"];
    [request setPostValue:_name forKey:@"name"];
    [request setPostValue:_userId forKey:@"user_id"];
    [request setPostValue:_pwd forKey:@"password"];
    [request setPostValue:_phone forKey:@"telephone"];
    //[request startAsynchronous];
    [self setGetUserInfo:request withRequestType:UserGetMineSetInfo WithNotifiType:TDGetSetMineGetInfo];
    [requestQueue addOperation:request];
}


#pragma mark 站内信
-(void)userGetMineMessage
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GET_MINE_MESSAGE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetMineMessage WithNotifiType:TDGetMineMessage];
    [requestQueue addOperation:request];
}


#pragma mark 置业顾问--工作任务
-(void)userGuWenWorkID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_WORK_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"user_id"];
    [self setGetUserInfo:request withRequestType:UserGuWenWork WithNotifiType:TDGuWenWork];
    [requestQueue addOperation:request];
    
}
#pragma mark 下拉菜单
-(void)userGuWenDropDown
{
    [self Netindicator:YES andStartStr:nil];
    
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_DROPDOWN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:USerGuDropDown WithNotifiType:TDGuDropDown];
    [requestQueue addOperation:request];

}
#pragma mark 置业顾问来电客户
-(void)userGuWenPhoneID:(NSString *)_id withSouNei:(NSString *)_sou withDengJi:(NSString *)_deng withKeState:(NSString *)_keSta withPaiFang:(NSString *)_pai
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_PHONE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"user_id"];
     [request setPostValue:_sou forKey:@"check_body"];
     [request setPostValue:_deng forKey:@"khdj"];
     [request setPostValue:_keSta forKey:@"deal_status"];
     [request setPostValue:_pai forKey:@"time_type"];
    [self setGetUserInfo:request withRequestType:UserGuPhone WithNotifiType:TDGuPhone];
    [requestQueue addOperation:request];
    
}
#pragma mark 置业顾问来电详情
-(void)userGuWenPhoneDetailsID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_PHONE_DETAILS_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
   
    [request setPostValue:_id forKey:@"caller_id"];
    [self setGetUserInfo:request withRequestType:UserGuPhoneDetails WithNotifiType:TDGuPhoneDetails];
    [requestQueue addOperation:request];
    
}
#pragma mark 修改来电
-(void)userGMXiuLaiDianWithID:(NSString *)_id withName:(NSString *)_name withPhone:(NSString *)_phone withPhone_A:(NSString *)_phone_a withPhone_B:(NSString *)_phone_b withXWuYe:(NSString *)_xWuYe withXArea:(NSString *)_xArea withXhouse:(NSString *)_xHouse withSex:(NSString *)_sex withCallTime:(NSString *)_callPhone withAD:(NSString *)_ad withTQu:(NSString *)_tQu withTWay:(NSString *)_tWay withTName:(NSString *)_tName withTPhone:(NSString *)_tPhone withPhoneJ:(NSString *)_phoneJ withNextTime:(NSString *)_nextTime withKhdj:(NSString *)_khdj
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_PHONE_XIU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"caller_id"];
    [request setPostValue:_name forKey:@"caller_name"];
    [request setPostValue:_phone forKey:@"caller_phone"];
    [request setPostValue:_phone_a forKey:@"phone_a"];
    [request setPostValue:_phone_b forKey:@"phone_b"];
    [request setPostValue:_xWuYe forKey:@"need_property"];
    [request setPostValue:_xArea forKey:@"order_area"];
    [request setPostValue:_xHouse forKey:@"order_type"];
    [request setPostValue:_sex forKey:@"caller_sex"];
    [request setPostValue:_callPhone forKey:@"caller_time"];
    [request setPostValue:_ad forKey:@"ggtg"];
    [request setPostValue:_tQu forKey:@"tjqd"];
    [request setPostValue:_tWay forKey:@"tjfs"];
    [request setPostValue:_tName forKey:@"recommend_name"];
    [request setPostValue:_tPhone forKey:@"recommend_phone"];
    [request setPostValue:_phoneJ forKey:@"dhjl"];
    [request setPostValue:_khdj forKey:@"khdj"];
    [request setPostValue:_nextTime forKey:@"remind_time"];
    [self setGetUserInfo:request withRequestType:UserGuPhoneXiu WithNotifiType:TDGuPhoneXiu];
    [requestQueue addOperation:request];

    
    
}
#pragma mark 新增来电
-(void)userGuwenwithName:(NSString *)_name withPhone:(NSString *)_phone withPhone_a:(NSString *)_phoneA withPhone_B:(NSString *)_phone_b withWuYe:(NSString *)_wuYe withArea :(NSString *)_area withHouse:(NSString *)_house withSex:(NSString *)_sex withPhoneTime:(NSString *)_phoneTime withKeDengJ:(NSString *)_dengJ withAD:(NSString *)_ad withTQu:(NSString *)_tQu withTWay:(NSString *)_tWay withTName:(NSString *)_tName withTPhone:(NSString *)_tPhone withPhoneJ:(NSString *)_phoneJ withNextTime:(NSString *)_nextTime withAdviser:(NSString *)_adviser
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_PHONE_ZENG_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];

    [request setPostValue:_name forKey:@"caller_name"];
    [request setPostValue:_phone forKey:@"caller_phone"];
    [request setPostValue:_phoneA forKey:@"phone_a"];
    [request setPostValue:_phone_b forKey:@"phone_b"];
    [request setPostValue:_wuYe forKey:@"need_property"];
    [request setPostValue:_area forKey:@"order_area"];
    [request setPostValue:_house forKey:@"order_type"];
    [request setPostValue:_sex forKey:@"caller_sex"];
    [request setPostValue:_phoneTime forKey:@"caller_time"];
    [request setPostValue:_dengJ forKey:@"khdj"];
    [request setPostValue:_ad forKey:@"ggtg"];
    [request setPostValue:_tQu forKey:@"tjqd"];
    [request setPostValue:_tWay forKey:@"tjfs"];
    [request setPostValue:_tName forKey:@"recommend_name"];
    [request setPostValue:_tPhone forKey:@"recommend_phone"];
    [request setPostValue:_phoneJ forKey:@"dhjl"];
    [request setPostValue:_nextTime forKey:@"remind_time"];
    [request setPostValue:_adviser forKey:@"adviser"];
    [self setGetUserInfo:request withRequestType:UserGuPhoneZeng WithNotifiType:TDGuPhoneZeng];
    [requestQueue addOperation:request];
    
    
}
#pragma mark 来电跟进列表
-(void)userPhoneGenJinBiaoWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_PHONE_GENBIAO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGuPhoneGenJinbiao WithNotifiType:TDGuPhoneGenJinBIao];
    [requestQueue addOperation:request];
    


}
#pragma mark 来电添加跟进
-(void)userGuWenPhoneZengID:(NSString *)_id withGenTime:(NSString *)_genTime withHuiMessage:(NSString *)_message withNextTime:(NSString *)_nextTime withUserID:(NSString *)_userID withType:(NSString *)_type withIsTrue:(NSString *)_isTrue
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_PHONE_GEN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_genTime forKey:@"follow_time"];
    [request setPostValue:_message forKey:@"back_info"];
    [request setPostValue:_nextTime forKey:@"remind_time"];
    [request setPostValue:_userID forKey:@"user_id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_isTrue forKey:@"is_true"];
    [self setGetUserInfo:request withRequestType:UserGuPhoneGen WithNotifiType:TDGuPhoneGen];
    [requestQueue addOperation:request];
    
}



#pragma mark 来访客户
-(void)UserGMKeLaiFangWithUserID:(NSString *)_id withKeLevel:(NSString *)_level withJiao:(NSString *)_jiao withSeacher:(NSString *)_seacherCont withPaiXu:(NSString *)_pai
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_KE_LAIFANG_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"user_id"];
    [request setPostValue:_level forKey:@"khdj"];
    [request setPostValue:_jiao forKey:@"deal_status"];
    [request setPostValue:_seacherCont forKey:@"check_body"];
    [request setPostValue:_pai forKey:@"time_type"];
    [self setGetUserInfo:request withRequestType:UserGetGMLaiFang WithNotifiType:TDGuKeLaiF];
    [requestQueue addOperation:request];
    
    
}
#pragma mark 来访详情
-(void)UserGMKeLaiFangXWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_KE_LAIFANGX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"customer_id"];
    [self setGetUserInfo:request withRequestType:UserGetGMLaiFangX WithNotifiType:TDGuKeLaiFX];
    [requestQueue addOperation:request];
    
}



#pragma mark 修改来访
-(void)UserGMKeXLaiFangWithID:(NSString *)_id withShouFTime:(NSString *)_shouTime withName:(NSString *)_name withPhone:(NSString *)_phone withPhone_A:(NSString *)_phone_a withPhone_B:(NSString *)_phone_b withIDCard:(NSString *)_idCard withIdCardDZ:(NSString *)_idCardDZ withSex:(NSString *)_sex withLevel:(NSString *)_level withAge:(NSString *)_age withZhuan:(NSString *)_zhuan withAD:(NSString *)_ad withQuDao:(NSString *)_qu withWay:(NSString *)_way withTName:(NSString *)_tName withTPhone:(NSString *)_tPhone withLive:(NSString *)_live withWork:(NSString *)_work withZhiID:(NSString *)_zhiID withTraffic:(NSString *)_traffic withMdDi:(NSString *)_muDi withBaiMiao:(NSString *)_miao withWuYe:(NSString *)_wuYe withXArea:(NSString *)_xArea withHuX:(NSString *)_huX withYinXu:(NSString *)_yinSu withNextData:(NSString *)_next
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_KE_XLAIFANG_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"customer_id"];
    [request setPostValue:_shouTime forKey:@"visit_time"];
    [request setPostValue:_name forKey:@"name"];
    [request setPostValue:_phone forKey:@"phone"];
    [request setPostValue:_phone_a forKey:@"phone_a"];
    [request setPostValue:_phone_b forKey:@"phone_b"];
    [request setPostValue:_idCard forKey:@"id_card"];
    [request setPostValue:_idCardDZ forKey:@"id_card_dz"];
    
    [request setPostValue:_sex forKey:@"sex"];
    [request setPostValue:_level forKey:@"khdj"];
    [request setPostValue:_age forKey:@"age_group"];
    [request setPostValue:_zhuan forKey:@"caller_to_visit"];
    [request setPostValue:_ad forKey:@"ggtg"];
    [request setPostValue:_qu forKey:@"tjqd"];
    [request setPostValue:_way forKey:@"tjfs"];
    [request setPostValue:_tName forKey:@"recommend_name"];
    [request setPostValue:_tPhone forKey:@"recommend_phone"];
    [request setPostValue:_live forKey:@"live_area"];
    [request setPostValue:_work forKey:@"work_area"];
    [request setPostValue:_zhiID forKey:@"job"];
    [request setPostValue:_traffic forKey:@"vehicle"];
    [request setPostValue:_muDi forKey:@"zymd"];
    [request setPostValue:_miao forKey:@"remark"];
    
    [request setPostValue:_wuYe forKey:@"need_property"];
    [request setPostValue:_xArea forKey:@"order_area"];
    [request setPostValue:_huX forKey:@"order_type"];
    [request setPostValue:_yinSu forKey:@"doubt"];
    [request setPostValue:_next forKey:@"remind_time"];
    
  
    
    
    
    [self setGetUserInfo:request withRequestType:UserGetGMXLaiFang WithNotifiType:TDGuKeXLaiFX];
    [requestQueue addOperation:request];
    
}

#pragma mark 新增来访

-(void)userGMXinZLaiFangWithShouData:(NSString *)_shouData withKName:(NSString *)_kName withPhone:(NSString *)_phone withPhone_a:(NSString *)_phone_a withPhone_b:(NSString *)_phone_b withIDcard:(NSString *)_idCard withIDcardDZ:(NSString *)_idCardZ withSex:(NSString *)_sex withLevel:(NSString *)_level withAge:(NSString *)_age withZhuan:(NSString *)_zhuan withYing:(NSString *)_ying withWangLuo:(NSString *)_wangLuo withHeZuo:(NSString *)_heZuo withTName:(NSString *)_tName withTPhone:(NSString *)_tPhone withLive:(NSString *)_live withWork:(NSString *)_work withZhiID:(NSString *)_zhiID withTraffic:(NSString *)_traffic withMuDi:(NSString *)_muDi withKeBai:(NSString *)_keMiao withWuYe:(NSString *)_wuYe withXArea:(NSString *)_xArea withXHu:(NSString *)_xHu withKYin:(NSString *)_kYin withNextGData:(NSString *)_nextData withAdviser:(NSString *)_adviser
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_KE_ZLAIFANG_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_shouData forKey:@"visit_time"];
    [request setPostValue:_kName forKey:@"name"];
    [request setPostValue:_phone forKey:@"phone"];
    [request setPostValue:_phone_a forKey:@"phone_a"];
    [request setPostValue:_phone_b forKey:@"phone_b"];
    [request setPostValue:_idCard forKey:@"id_card"];
    [request setPostValue:_idCardZ forKey:@"id_card_dz"];
    [request setPostValue:_sex forKey:@"sex"];
    [request setPostValue:_level forKey:@"khdj"];
    [request setPostValue:_age forKey:@"age_group"];
    [request setPostValue:_zhuan forKey:@"caller_to_visit"];
    [request setPostValue:_ying forKey:@"ggtg"];
    [request setPostValue:_wangLuo forKey:@"tjqd"];
    [request setPostValue:_heZuo forKey:@"tjfs"];
    [request setPostValue:_tName forKey:@"recommend_name"];
    [request setPostValue:_tPhone forKey:@"recommend_phone"];
    [request setPostValue:_live forKey:@"live_area"];
    [request setPostValue:_work forKey:@"work_area"];
    [request setPostValue:_zhiID forKey:@"job"];
    [request setPostValue:_traffic forKey:@"vehicle"];
    [request setPostValue:_muDi forKey:@"zymd"];
    [request setPostValue:_keMiao forKey:@"remark"];
    [request setPostValue:_wuYe forKey:@"need_property"];
    [request setPostValue:_xArea forKey:@"order_area"];
    [request setPostValue:_xHu forKey:@"order_type"];
    [request setPostValue:_kYin forKey:@"doubt"];
    [request setPostValue:_nextData forKey:@"remind_time"];
    [request setPostValue:_adviser forKey:@"adviser"];
    
    [self setGetUserInfo:request withRequestType:UserGetGMZLaiFang WithNotifiType:TDGuKeZLaiF];
    [requestQueue addOperation:request];
}

#pragma mark 跟进列表
-(void)userVisitGenJInBiaoWIthID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_KE_GENBIAO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    
    [self setGetUserInfo:request withRequestType:UserGetGMZFangGenBiao WithNotifiType:TDGuKeVisitBiao];
    [requestQueue addOperation:request];

}
#pragma mark 添加跟进
-(void)userGMKeLaiFangGenWithID:(NSString *)_id withGenTime:(NSString *)_genTime withHuiMessage:(NSString *)_message withNextTime:(NSString *)_time withUserID:(NSString *)_uesrID withType:(NSString *)_type withIsTrue:(NSString *)_isTrue
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_KE_LAIFANGG_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_genTime forKey:@"follow_time"];
    [request setPostValue:_message forKey:@"back_info"];
    [request setPostValue:_time forKey:@"remind_time"];
    [request setPostValue:_uesrID forKey:@"user_id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_isTrue forKey:@"is_true"];
    
    
    
    [self setGetUserInfo:request withRequestType:UserGetGMLaiFangG WithNotifiType:TDGuKeGLaiF];
    [requestQueue addOperation:request];
}





#pragma mark 我的业绩主售--认筹
-(void)userGuWenMeZhuRenWithID:(NSString *)_id withSouSuo:(NSString *)_sou withSouType:(NSString *)_type withJiaoStatue:(NSString *)_jiao withTuiChou:(NSString *)_tui
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_YEJI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_sou forKey:@"check_body"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_jiao forKey:@"cjzt"];
    [request setPostValue:_tui forKey:@"tczt"];
 
   
    [self setGetUserInfo:request withRequestType:UserGetGuZhuRen WithNotifiType:TDGuMeZhuRen];
    [requestQueue addOperation:request];
}


#pragma mark 我的业绩主售--认购
-(void)userGMZhuShouRenGouWithID:(NSString *)_id withSouSuo:(NSString *)_sou withSouType:(NSString *)_type withShouFuState:(NSString *)_houState withQianYState:(NSString *)_qian
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_YERENGOU_URL];
   ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_sou forKey:@"check_body"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_houState forKey:@"sfzt"];
    [request setPostValue:_qian forKey:@"qyzt"];

    [self setGetUserInfo:request withRequestType:UserGetGMRenGou WithNotifiType:TDGMZhuRenGou];

     [requestQueue addOperation:request];
    
}

#pragma mark 我的业绩主售--认购详情
-(void)userGMRenGouDatialsWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_RENGOUDATILS_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
     [self setGetUserInfo:request withRequestType:UserGetGMRenGouX WithNotifiType:TDGMZhuRengouDatils];
    [requestQueue addOperation:request];

}

#pragma mark 我的业绩主售--签约
-(void)userGMQianYueWithID:(NSString *)_id withSouType:(NSString *)_type withSouSuo:(NSString *)_sou withHuiKuan:(NSString *)_hui
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_QIANYUE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
     [request setPostValue:_type forKey:@"check_body"];
     [request setPostValue:_sou forKey:@"type"];
     [request setPostValue:_hui forKey:@"hkzt"];
    
    
    
    [self setGetUserInfo:request withRequestType:UserGetGMQianYue WithNotifiType:TDGMZhuQianYue];
    [requestQueue addOperation:request];
}
#pragma mark 我的业绩主售--签约详情
-(void)userGMQianYueDeatailsWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_QIANDATALIS_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetGMQianYueX WithNotifiType:TDGMZhuQianYUeDatials];
    [requestQueue addOperation:request];
}

#pragma mark 我的业绩--商业房源--认购
-(void)userGMShangRenGouWithID:(NSString *)_id withSouSuo:(NSString *)_sou withSouType:(NSString *)_type withShouF:(NSString *)_shou withQianYue:(NSString *)_qian
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_BUSREN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
      [request setPostValue:_sou forKey:@"check_body"];
      [request setPostValue:_type forKey:@"type"];
      [request setPostValue:_shou forKey:@"sfzt"];
      [request setPostValue:_qian forKey:@"qyzt"];
    [self setGetUserInfo:request withRequestType:UserGetGMShangRen WithNotifiType:TDGMShangRenGou];
    
    [requestQueue addOperation:request];
}

#pragma mark 我的业绩--商业房源--认购详情
-(void)userGMShangRenGouXWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_BUSRENX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetGMShangRenX WithNotifiType:TDGMShangRenGouX];
    [requestQueue addOperation:request];
}
#pragma mark 我的业绩--商业房源--签约
-(void)userGMShnagQianYueWithID:(NSString *)_id withSouSuo:(NSString *)_sou withSouType:(NSString *)_type withHuiK:(NSString *)_hui
{
//    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_BUSQIAN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
     [request setPostValue:_sou forKey:@"check_body"];
     [request setPostValue:_type forKey:@"type"];
     [request setPostValue:_hui forKey:@"hkzt"];
    [self setGetUserInfo:request withRequestType:UserGetGMShangQian WithNotifiType:TDGMQianYue];
    [requestQueue addOperation:request];
}
#pragma mark /我的业绩--商业房源--签约详情

-(void)userGMShangQianYueXWitnID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_BUSQIANX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UsetGetGMShangQianX WithNotifiType:TDGMQianYueX];
    [requestQueue addOperation:request];
}
#pragma mark 我的业绩--配套房源--认购
-(void)userGMPeiRenGouWithID:(NSString *)_id withSouSuo:(NSString *)_sou withSouType:(NSString *)_type withWuYe:(NSString *)_wu withFangK:(NSString *)_fang
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_PEI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_sou forKey:@"check_body"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_wu forKey:@"wylx"];
    [request setPostValue:_fang forKey:@"sfzt"];
    [self setGetUserInfo:request withRequestType:UserGetGMPeiRen WithNotifiType:TDPeiRenGou];
    [requestQueue addOperation:request];
}
#pragma mark 我的业绩--配套房源--认购详情
-(void)userGMPeiRenGouXWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_PEIX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetGMPeiRenX WithNotifiType:TDPeiRenGouX];
    [requestQueue addOperation:request];
}

#pragma mark 我的佣金--客户列表
-(void)userGMYongJinKeHuWithID:(NSString *)_id withHuiK:(NSString *)_hui withYongJ:(NSString *)_yong withSouSuoT:(NSString *)_type withSouSuo:(NSString *)_sou
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_YONGJINK_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_hui forKey:@"hkzt"];
    [request setPostValue:_yong forKey:@"yjzt"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_sou forKey:@"check_body"];
    [self setGetUserInfo:request withRequestType:UserGetGMYJKe WithNotifiType:TDYJke];
    [requestQueue addOperation:request];

    
}

#pragma mark 我的佣金--佣金详情
-(void)UserGMYongJinXWithID:(NSString *)_id withType:(NSString *)_type
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_YONGJINX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_type forKey:@"type"];
    [self setGetUserInfo:request withRequestType:UserGetGMYJX WithNotifiType:TDYongJinX];
    [requestQueue addOperation:request];

}

#pragma mark /我的佣金--结算详情
-(void)UserGMYongJinJieSuanXwithID:(NSString *)_id withAdviser:(NSString *)_adviserID withWuYeType:(NSString *)_wyType
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_ME_YJJIESUANX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_adviserID forKey:@"adviser"];
    [request setPostValue:_wyType forKey:@"wylx"];
    [self setGetUserInfo:request withRequestType:UserGetGMJieX WithNotifiType:TDYongJieSuanX];
    [requestQueue addOperation:request];
}



/*置业顾问--房源销售*/
#pragma mark 房源销售--主售房源
-(void)userFYZhuShou
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_ZHUSHOU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetFZhuShou WithNotifiType:TDFZhuShouHouse];
    [requestQueue addOperation:request];
}
#pragma mark 房源销售--主售房源单元
-(void)UserTYZhuShouUnitWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_ZSUNIT_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"project_id"];
    
    [self setGetUserInfo:request withRequestType:UserGetFZhuShouUnit WithNotifiType:TDTZhuShouHouseUnit];
    [requestQueue addOperation:request];
}
#pragma mark 房源销售--主售房源信息
-(void)userFYZhuShouMessageWithLouID:(NSString *)_louID withUnitID:(NSString *)_unitID
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_ZSMESSAGE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_louID forKey:@"project_id"];
    [request setPostValue:_unitID forKey:@"unit"];
    [self setGetUserInfo:request withRequestType:UserGetFZhuShouMessage WithNotifiType:TDFZhuShouHouseMessage];
    [requestQueue addOperation:request];
}


#pragma mark 商业房源
-(void)userZhuShouHouseBusness
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_BUS_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetZhuSBus WithNotifiType:TDZhuSBusHouse];
    [requestQueue addOperation:request];
}
#pragma mark 配套房源
-(void)userZhuShouPeiTaoHouse
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_BUSPEI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetZhuSPei WithNotifiType:TDZhuSPeiHouse];
    [requestQueue addOperation:request];
}
#pragma mark 表头(配套/商业)
-(void)userZhuShouHouseBiaoWithType:(NSString *)_type withQiShu:(NSString *)_qi
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_BUSTOU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_type forKey:@"under_nature"];
    [request setPostValue:_qi forKey:@"periods"];
    [self setGetUserInfo:request withRequestType:UserGetZhuSBiao WithNotifiType:TDZhuSBiaoTou];
    [requestQueue addOperation:request];
    
}
#pragma mark /房源(配套/商业)
-(void)userZhuShouFangYuanWithType:(NSString *)_type withQi:(NSString *)_qi withQuYU:(NSString *)_qu withLou:(NSString *)_lou
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_BUSPF_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_type forKey:@"under_nature"];
    [request setPostValue:_qi forKey:@"periods"];
    [request setPostValue:_qu forKey:@"zone"];
    [request setPostValue:_lou forKey:@"block"];
    [self setGetUserInfo:request withRequestType:UserGetZhuSHouse WithNotifiType:TDZhuSHouse];
    [requestQueue addOperation:request];
}

#pragma mark 房源优惠
-(void)userZhuShouYouHuiWithID:(NSString *)_id withType:(NSString *)_type withStates:(NSString *)_states
{
    
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_YOU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_states forKey:@"is_sale"];
   
    [self setGetUserInfo:request withRequestType:UserGetYouHui WithNotifiType:TDZhuSYouHui];
    [requestQueue addOperation:request];
}
#pragma mark 房源预留
-(void)userZhuShouYuLiuWithID:(NSString *)_id withType:(NSString *)_type withLiuName:(NSString *)_liuName withLiuTime:(NSString *)_time withBeiZhu:(NSString *)_bei
{
 
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GU_HOUSE_YULIU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_liuName forKey:@"yuliu_name"];
    [request setPostValue:_time forKey:@"yuliu_time"];
    [request setPostValue:_bei forKey:@"yuliu_beizhu"];
    
    [self setGetUserInfo:request withRequestType:UserGetYuLiu WithNotifiType:TDZhuSYuLiu];
    [requestQueue addOperation:request];
    
    
}


/*销售经理---销售动态*/
#pragma mark 销售经理-----特别优惠列表
-(void)userManagerYouHuiWithUserId:(NSString *)_userId
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_YOUHUI_BIAO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_userId forKey:@"user_id"];
    request.shouldAttemptPersistentConnection   = NO;
    [self setGetUserInfo:request withRequestType:UserMYouHuiBiao WithNotifiType:TDManagerYouHuiBiao];
    [requestQueue addOperation:request];
}

#pragma mark 销售经理--特别优惠详情
-(void)userManagerYouHuiXwithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_YOUHUI_XIANG_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
     [request setPostValue:_id forKey:@"id"];
    request.shouldAttemptPersistentConnection   = NO;
    [self setGetUserInfo:request withRequestType:UserMyouHuiXiangQ WithNotifiType:TDManagerYouHuiXiang];
    [requestQueue addOperation:request];
}

#pragma mark 销售经理--特别优惠查询
-(void)userManagerYouHuiChaXunWithWuType:(NSString *)_wuType withLouHao:(NSString *)_lou withUnit:(NSString *)_unit withQuYu:(NSString *)_qu withRoom:(NSString *)_room
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_YOUHUI_CHAXUN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_wuType forKey:@"wyxz"];
    [request setPostValue:_lou forKey:@"block"];
    [request setPostValue:_unit forKey:@"unit"];
    [request setPostValue:_qu forKey:@"zone"];
    [request setPostValue:_room forKey:@"room"];
    
    [self setGetUserInfo:request withRequestType:UserYouHuiCha WithNotifiType:TDManagerYouHuiChaXun];
    [requestQueue addOperation:request];
    
}

#pragma mark 销售经理--特别优惠保存
-(void)userManageryouHuiBaoCunWithID:(NSString *)_id withType:(NSString *)_type withBeiZhu:(NSString *)_beiZhu withDate:(NSString *)_date withWuYe:(NSString *)_wuYe
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_YOUHUI_BAOCUN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_beiZhu forKey:@"remark"];
    [request setPostValue:_date forKey:@"sq_time"];
    [request setPostValue:_wuYe forKey:@"wyxz"];
    
    [self setGetUserInfo:request withRequestType:UserYouHuiBao WithNotifiType:TDManagerYouHuiBaoCun];
    [requestQueue addOperation:request];
    
}










#pragma mark 销售经理---销售动态页面--销售动态
-(void)userManagerFirstSalesDynamic
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_FIRST_SALES_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
      request.shouldAttemptPersistentConnection   = NO;
    [self setGetUserInfo:request withRequestType:UserGetManagerSales WithNotifiType:TDManagerFirstSales];
    [requestQueue addOperation:request];
}
#pragma mark 销售经理---销售动态页面--回款动态
-(void)userManagerFirstMoneyDynamic
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_FIRST_MONEY_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetManagerMoney WithNotifiType:TDManagerFirstMoney];
  
    [requestQueue addOperation:request];
}
#pragma mark 销售经理---销售动态页面--均价动态
-(void)userManagerFirstJunJiaDynamic
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_FIRST_JUNJIA_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetManagerJun WithNotifiType:TDManagerFirstJunJia];
    [requestQueue addOperation:request];
}
#pragma mark 销售经理---销售动态页面--均价表动态
-(void)userManagerFirstJunJiaBiaoDynamicWithType:(NSString *)_type
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_FIRST_JUNJIABIAO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_type forKey:@"type"];
    [self setGetUserInfo:request withRequestType:UserGetManagerJunBiao WithNotifiType:TDManagerFirstJunBiao];
    [requestQueue addOperation:request];
}

/*销售经理---营销分析*/
#pragma mark 经理--营销--客户分析
-(void)userManagerSecondKeHua
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_SECOND_KEHU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetManagerHeHu WithNotifiType:TDManagerSecondKeHu];
    [requestQueue addOperation:request];
}
#pragma mark 经理--营销--客户分析搜索

-(void)userManagerKeFenXiSouSuoWithStartTime:(NSString *)_start withEndTime:(NSString *)_end withType:(NSString *)_type
{
    
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_KEFENSOUSUO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_start forKey:@"start_time"];
     [request setPostValue:_end forKey:@"end_time"];
     [request setPostValue:_type forKey:@"type"];
    [self setGetUserInfo:request withRequestType:UserGetMangerKeFenSouSuo WithNotifiType:TDManagerKeFenXiSouSuo];
    
    [requestQueue addOperation:request];
    
    
}
#pragma mark 经理--营销--去化分析
-(void)userManagerSecondQuHua
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_SECOND_QUHUA_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetManagerQuHua WithNotifiType:TDManagerSecondQuHua];
    [requestQueue addOperation:request];
}
#pragma mark 经理--营销--广告表分析
-(void)userManagerSecongADBiao
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_SECOND_AD_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetManagerADB WithNotifiType:TDManagerSecondADBiao];
    [requestQueue addOperation:request];
}
#pragma mark 经理--营销--广告图分析
-(void)userManagerSecondADTu
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,MANAGER_SECOND_ADTU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetManagerAD WithNotifiType:TDManagerSecondADTu];
    [requestQueue addOperation:request];
}




/*  CEO=======CEO 个人中心--价格审批 */
#pragma mark（主售）审批列表
-(void)userCEOZhuShenPiLieBiao
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_ZHU_SHENPILB_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetCeoZhuSPLB WithNotifiType:TDCeoMeZhuSPLB];
    [requestQueue addOperation:request];
}
#pragma mark（主售）单元
-(void)userCEOZhuUnitWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_ZHU_UNIT_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
     [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetCeoZhuUnit WithNotifiType:TDCeoMeZhuUnit];
    [requestQueue addOperation:request];
}
#pragma mark （主售）房源
-(void)userCEOZhuhousewithID:(NSString *)_id withUnit:(NSString *)_unit
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_ZHU_HOUSE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_unit forKey:@"unit"];
    [self setGetUserInfo:request withRequestType:UserGetCeoZhuHouse WithNotifiType:TDCeoMeZhuHouse];
    [requestQueue addOperation:request];
}
#pragma mark （主售）定价说明
-(void)userCEOZhuDJShuoMingWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_ZHU_JIASM_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetCeoZhuDJSM WithNotifiType:TDCeoMeZhuDJSM];
    [requestQueue addOperation:request];
}
#pragma mark（主售）定价审批
-(void)userCEOZhuDJShenPiWithID:(NSString *)_id withUserId:(NSString *)_userID withType:(NSString *)_type withXiuOpinion:(NSString *)_yiJian
{
    
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_ZHU_JIASP_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_userID forKey:@"user_id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_yiJian forKey:@"xgyj"];
    [self setGetUserInfo:request withRequestType:UserGetCeoZhuDJSP WithNotifiType:TDCeoMeZhuDJSP];
    [requestQueue addOperation:request];
}







#pragma mark （商业）审批列表
-(void)userCeoBusShenPLB
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_BUS_SPLB_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetCeoBusSPLB WithNotifiType:TDCeoMeBusSPLB];
    [requestQueue addOperation:request];
}
#pragma mark （配套）审批列表
-(void)userCeoPeiShenPLB
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_PEIT_SHENLI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetCeoPeiSPLB WithNotifiType:TDCeoMePeiSPLB];
    [requestQueue addOperation:request];
}
#pragma mark ( 配套/商业 )审批详情
-(void)userCeoBusPeiShenPXWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_BUSPEI_SPX_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetCeoBusPeiSPX WithNotifiType:TDCeoMeBusPeiShenX];
    [requestQueue addOperation:request];
}
#pragma mark 配套/商业）定价说明
-(void)userCeoBUsPeiDingJSMWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_BUSPEI_DINGSM_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetCeoBusPeiDJSM WithNotifiType:TDCeoMeBusPeiDingJ];
    [requestQueue addOperation:request];
}
#pragma mark (商业 / 配套)定价审批
-(void)userCeoBusPeiDJSPiWithID:(NSString *)_id withUserID:(NSString *)_userID withType:(NSString *)_type withXiuYiJ:(NSString *)_yiJ
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_BUSPEI_DJSHENPI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_userID forKey:@"user_id"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_yiJ forKey:@"xgyj"];
    [self setGetUserInfo:request withRequestType:UserGetCeoBusPeiDJSP WithNotifiType:TDCeoMeBusPeiDingSP];
    [requestQueue addOperation:request];
}


/*  CEO=======CEO 个人中心--优惠政策审批 */
#pragma mark 优惠政策列表
-(void)userCeoYouHuiLieBiao
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_PREFERENTIAL_LIEBIAO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetCeoYouHLieB WithNotifiType:TDCeoYouHLieBIao];
    [requestQueue addOperation:request];
}
#pragma mark 优惠政策详情
-(void)userCeoYouHuiXWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_PREFERENTIAL_X_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    
    [self setGetUserInfo:request withRequestType:UserGetCeoYouHX WithNotifiType:TDCeoYouHuiX];
    [requestQueue addOperation:request];
}
#pragma mark 优惠政策审批
-(void)userCeoYouHuiShenPiWithDid:(NSString *)_did withUid:(NSString *)_uid withType:(NSString *)_type
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_PREFER_SHENP_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_did forKey:@"did"];
    [request setPostValue:_uid forKey:@"uid"];
    [request setPostValue:_type forKey:@"type"];
    [self setGetUserInfo:request withRequestType:UserGetCeoYouHShenP WithNotifiType:TDCeoYouHShenP];
    [requestQueue addOperation:request];
}


/*  CEO=======CEO 个人中心--特别优惠政策审批 */
#pragma mark 特别优惠列表
-(void)userCeoTeBieYouHuiLeiBie
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_TEBLIEBIAO_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetCeoTeBieYouHLieB WithNotifiType:TDCeoTeBieYouHBiao];
    [requestQueue addOperation:request];
}
#pragma mark 特别优惠详情
-(void)userCeoTeBieYouHuiXWithID:(NSString *)_id
{
    
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_TEBIE_X_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
     [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserGetCeoTeBieYouHX WithNotifiType:TDCeoTebIeYouHX];
    [requestQueue addOperation:request];
    
}
#pragma mark 特别优惠审批
-(void)userCeoTeBieYouHShenPiWithYID:(NSString *)_yid withUID:(NSString *)_uid withType:(NSString *)_type withDJYH:(NSString *)_djyh withZJYH:(NSString *)_zjyh withBL:(NSString *)_bl
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_TEBIE_SHENPI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_yid forKey:@"yid"];
    [request setPostValue:_uid forKey:@"uid"];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_djyh forKey:@"zj_yh"];//现金优惠(总价)
    [request setPostValue:_zjyh forKey:@"dj_yh"];//单价
    [request setPostValue:_bl forKey:@"bl"];
    [self setGetUserInfo:request withRequestType:UserGetCeoTeBieYouHShenP WithNotifiType:TDCeoTeBieyouHShenP];
    [requestQueue addOperation:request];
    
}



#pragma mark 消息提醒
-(void)UserCeoMessage
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEO_MESSAGE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [self setGetUserInfo:request withRequestType:UserGetCeoMessage WithNotifiType:TDCeoMessage];
    [requestQueue addOperation:request];
}




//*来电来访修改           */
#pragma mark 来电跟进页面

-(void)userCallGenJinYeMIanWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CALL_GENJIN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserCAllGenJin WithNotifiType:TDCallGenJin];
    [requestQueue addOperation:request];
}
#pragma mark 来电关怀
-(void)userCallGUanHuaiWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CALL_GUANHUAI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserCallGuanHUai WithNotifiType:TDCallGuanHuai];
    [requestQueue addOperation:request];
}
#pragma mark 来电关怀保存
-(void)userCallGuanHuaiBaoCunWithId:(NSString *)_id withBirthday:(NSString *)_birthCare withBirthDayDate:(NSString *)_birthDate withDayCare:(NSString *)_dayCare withDayDate:(NSString *)_dayDate
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CALL_GUANBAOCUN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_birthCare forKey:@"birth_care"];
    [request setPostValue:_birthDate forKey:@"birth_date"];
    [request setPostValue:_dayCare forKey:@"day_care"];
    [request setPostValue:_dayDate forKey:@"day_date"];
    [self setGetUserInfo:request withRequestType:UserCallGuanHuaiBaoCun WithNotifiType:TDCAllGHBaoCun];
    [requestQueue addOperation:request];
}
#pragma mark 来访跟进页面
-(void)userVisitGenJinWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,VISIT_GENJIN_URL];
//     NSLog(@"--url-%@",str);
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserVisitGenJIn WithNotifiType:TDVisitGenJin];
    [requestQueue addOperation:request];
}
#pragma mark 来访关怀
-(void)userVisitGuanHUaiWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,VISIT_GUNAHUAI_URL];
   
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserVIsitGuanHUai WithNotifiType:TDVisitGuanHuai];
    [requestQueue addOperation:request];
}
#pragma mark 来访关怀保存
-(void)userVisitGuanHuaiBaoCunWithID:(NSString *)_id withBirthCare:(NSString *)_birthCare withBirthDate:(NSString *)_date withDayCare:(NSString *)_dayCare withDayDate:(NSString *)_dayDte
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,VISIT_GUANCUN_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_birthCare forKey:@"birth_care"];
    [request setPostValue:_date forKey:@"birth_date"];
    [request setPostValue:_dayCare forKey:@"day_care"];
    [request setPostValue:_dayDte forKey:@"day_date"];
    [self setGetUserInfo:request withRequestType:UserVisitHuaiBaoCun WithNotifiType:TDVisitGHBaoCun];
    [requestQueue addOperation:request];
}
#pragma mark 跟进记录修改
-(void)UserGenJInXiuGaiWithFID:(NSString *)_fid withTID:(NSString *)_tid withBackInFo:(NSString *)_backInfo withRemind:(NSString *)_remindTime withIsTure:(NSString *)_isTure withType:(NSString *)_type 
{
   
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,GENJINGAI_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_fid forKey:@"fid"];
     [request setPostValue:_tid forKey:@"tid"];
     [request setPostValue:_backInfo forKey:@"back_info"];
    [request setPostValue:_remindTime forKey:@"remind_time"];
     [request setPostValue:_isTure forKey:@"is_true"];
    [request setPostValue:_tid forKey:@"type"];

//    [request setPostValue:[_tid isEqualToString:@"1"]?@"2":@"1" forKey:@"type"];
    [self setGetUserInfo:request withRequestType:UserGenJinXiuGai WithNotifiType:TDGenJinXiuGai];
    [requestQueue addOperation:request];
    
}






//TODO:  CEO 优惠政策审批---------方法
/*-------------------优惠政策列表-------------------*/
#pragma mark-------- 优惠政策列表------主售房源
-(void)setUPYouHuiTabViewZhuHouse
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOUHUI_ZHUSHOU_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];

    [self setGetUserInfo:request withRequestType:UserCeoCeBiaoZhu WithNotifiType:TDCeoCeTabViewZhu];
    [requestQueue addOperation:request];
}

#pragma mark-------- 优惠政策列表------商业房源
-(void)SetUpTabViewBusnessHouse
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOUHUI_BUSNESS_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [self setGetUserInfo:request withRequestType:UserCeoCeBiaoBusness WithNotifiType:TDCeoCeTabViewBusness];
    [requestQueue addOperation:request];
}
#pragma mark-------- 优惠政策列表------车位
-(void)setUpTabViewYouHuiSpking
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOUHUI_SPKING_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [self setGetUserInfo:request withRequestType:UserCeoCeBiaoSpking WithNotifiType:TDCeoCeTabViewSpking];
    [requestQueue addOperation:request];
}
#pragma mark--------优惠政策列表-------储藏室
-(void)setUpStoreRoomYouHui
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOUHUI_STOREROOM_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    
    [self setGetUserInfo:request withRequestType:UserCeoCeBiaoStoreRoom WithNotifiType:TDCeoCeTabViewRoom];
    [requestQueue addOperation:request];
}

#pragma mark--------主售房源(单元)
-(void)setUpCeoShenPiZhuShouUnitWithProjectID:(NSString *)_projectID
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOZHUSHOU_UNIT_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_projectID forKey:@"project_id"];
    [self setGetUserInfo:request withRequestType:UserCeoPiZhuUnit WithNotifiType:TDCeoCeZhuUnit];
    [requestQueue addOperation:request];
}

#pragma mark--------主售房源(房源)
-(void)setUpCeoYouHuiPiZhuShouHouseWithProjectID:(NSString *)_projectID withUnit:(NSString *)_unit
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOZHUSHOU_HOUSE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_projectID forKey:@"project_id"];
    [request setPostValue:_unit forKey:@"unit"];
    [self setGetUserInfo:request withRequestType:UserCeoPiZhuHouse WithNotifiType:TDCeoCezhuHOuse];
    [requestQueue addOperation:request];

    
}
#pragma mark--------商业房源
-(void)setUpCeoShenPiBussnessWithID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOBUSNESS_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserCeoPiBusness WithNotifiType:TDCeoCeBusness];
    [requestQueue addOperation:request];
}
#pragma mark-------- 车位房源
-(void)setUpCeoShenPiSpkingWithQuID:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOSPKING_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserCeoPiSpking WithNotifiType:TDCeoCeSpking];
    [requestQueue addOperation:request];
}
#pragma mark--------储藏室房源
-(void)SetUpCeoShenPiStoreRoomWithFloorId:(NSString *)_id
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOSTOROOM_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_id forKey:@"id"];
    [self setGetUserInfo:request withRequestType:UserCeoPiStoreRoom WithNotifiType:TDCeoCeStoreRoom];
    [requestQueue addOperation:request];
}
#pragma mark--------优惠查看
-(void)setUPCeoShenPiYouHuiLookWIthZhuID:(NSString *)_roomID withBUsnessID:(NSString *)_UnderID
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOUHUILOOK_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_roomID forKey:@"room_id"];
    [request setPostValue:_UnderID forKey:@"under_id"];
    [self setGetUserInfo:request withRequestType:UserCeoPiYouLook WithNotifiType:TDCeoCeYouLook];
    [requestQueue addOperation:request];
}
#pragma mark--------优惠政策执行
-(void)setUpCeoShenPiYouHuiAgreeWithType:(NSString *)_type withProjectID:(NSString *)_id withUID:(NSString *)_uid
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOUAGREE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_id forKey:@"id"];
     [request setPostValue:_uid forKey:@"uid"];
    [self setGetUserInfo:request withRequestType:UserCeoPiAgree WithNotifiType:TDCeoCeAgree];
    [requestQueue addOperation:request];
}
#pragma mark-------- 优惠政策驳回
-(void)setUPCeoYouHUIPiUnAgreeWithType:(NSString *)_type WithID:(NSString *)_id withUid:(NSString *)_uid
{
    [self Netindicator:YES andStartStr:nil];
    NSString *str = [NSString stringWithFormat:@"%@%@",SERVE_URL,CEOYOU_UNAGREE_URL];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:str]];
    [request setPostValue:_type forKey:@"type"];
    [request setPostValue:_id forKey:@"id"];
    [request setPostValue:_uid forKey:@"uid"];
    [self setGetUserInfo:request withRequestType:UserCeoPiUnAgree WithNotifiType:TDCeoCeUNAgree];
    [requestQueue addOperation:request];
}






















#pragma mark 设置请求类型《enum》-------------------------------------------------------
- (void)setGetUserInfo:(ASIFormDataRequest *)request withRequestType:(RequestType)requestType WithNotifiType:(NSString*)notifiType
{
    NSMutableDictionary * dict = [[NSMutableDictionary alloc] init];
    
    [dict setObject:[NSNumber numberWithInt:requestType] forKey:USER_INFO_KEY_TYPE];
    
    [dict setObject:notifiType forKey:USER_NOTIFI_KEY_TYPE];
    //不知道你们这个网络请求怎么写的这个是最老的那个我也不知道
    [request setUserInfo:dict];
}

#pragma mark 请求失败回调方法   弹出来的是这个嗯
- (void)requestFailed:(ASIHTTPRequest *)request{
    if (request.error)
    {
        [self Netindicator:YES andStartStr:nil];
        NSDictionary* userInfo = [request userInfo];
        RequestType requestType = [[userInfo objectForKey:USER_INFO_KEY_TYPE]intValue];
        NSString *notifiType = [userInfo objectForKey:USER_NOTIFI_KEY_TYPE];
        UIAlertView* alrt = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"网络出现问题" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
        [alrt show];
        
        NSSLog(@"错误error(通知类型：%@，请求类型：%u)%@：",notifiType,requestType,request.error.description);
    }
}

#pragma mark 请求完成回调方法
- (void)requestFinished:(ASIFormDataRequest *)request
{
    [self Netindicator:NO andStartStr:nil];
    
    NSDictionary* userInfo = [request userInfo];
    RequestType requestType = [[userInfo objectForKey:USER_INFO_KEY_TYPE] intValue];
    
    NSString* notifiType = [userInfo objectForKey:USER_NOTIFI_KEY_TYPE];
    NSString* responseStr = [request responseString];
    
    if (!responseStr)
    {
        UIAlertView* alertView =  [[UIAlertView alloc]initWithTitle:@"提示" message:@"数据格式错误" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
        [alertView show];
        return;
    }
    
    if (request.error)//弹出具体的错误原因
    {
        UIAlertView* alertView =  [[UIAlertView alloc]initWithTitle:@"提示" message:request.error.description delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
        [alertView show];
        return;
    }
    
    NSData* returnData = [request responseData];
    NSDictionary* jsonData = [NSJSONSerialization JSONObjectWithData:returnData options:NSJSONReadingMutableLeaves error:nil];
    
    int status = [[jsonData objectForKey:@"status"]intValue];
    
    NSString* wrongStr = nil;
    
//    if (code != 100)
//    {
//        NSSLog(@"错误代码：%i",code);
//    }
    
    if (status == 101)
    {
        
        wrongStr = @"无权限登录";
    }
    if (status == 201)
    {
        wrongStr = @"账号或密码错误";
    }
    if (status == 301)
    {
        wrongStr = @"登录信息不完整";
    }

    
    if (wrongStr != nil)
    {
        UIAlertView* alertView =  [[UIAlertView alloc]initWithTitle:@"提示" message:wrongStr delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
        [alertView show];
    }
    else
    {
        NSSLog(@"请求返回结果(通知类型：%@，请求类型：%u)%@：",notifiType,requestType,jsonData);
        
        [[NSNotificationCenter defaultCenter]postNotificationName:notifiType object:jsonData];
        
    }
    
}


#pragma mark Json&&Dictionary相互转换
+ (NSString*)dictionaryToJson:(NSDictionary *)dic

{
    NSError *parseError = nil;
    
    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:&parseError];
    
    
    return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
    
}
+(NSDictionary *)parseJSONStringToNSDictionary:(NSString *)JSONString
{
    NSData *JSONData = [JSONString dataUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *responseJSON = [NSJSONSerialization JSONObjectWithData:JSONData options:NSJSONReadingMutableLeaves error:nil];
    return responseJSON;
}

#pragma mark  Json&&Array 相互转换
+ (NSString*)arrayToJson:(NSArray*)ary
{
    NSError *parseError = nil;
    
    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:ary options:NSJSONWritingPrettyPrinted error:&parseError];
    
    return  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
+ (NSArray*)parseJSONStringToNSArray:(NSString*)JSONString
{
    NSData *JSONData = [JSONString dataUsingEncoding:NSUTF8StringEncoding];
    
    NSArray *responseJSON = [NSJSONSerialization JSONObjectWithData:JSONData options:NSJSONReadingMutableContainers error:nil];
    
    return responseJSON;
}


#pragma mark 生成sign
+(NSString*)MakeSignMethod:(NSString*)_shortUrl
{
    
    NSString* sid =  [[[NSUserDefaults standardUserDefaults]objectForKey:@"UID"] substringWithRange:NSMakeRange(0, 16)];
    
    NSString* skey = [[[NSUserDefaults standardUserDefaults]objectForKey:@"SKEY"] substringWithRange:NSMakeRange(16, 16)];
    
    NSString *strTime = [TodoHttpManager MakeUnixTime];
    
    NSString* mdStr = [NSString stringWithFormat:@"%@%@%@%@",_shortUrl,sid,strTime,skey];
    
    [CJMD5 md5HexDigest:mdStr];
    
    [CJMD5 md5:mdStr];
    
    //    NSLog(@"时间戳: %@",strTime);
    //    NSLog(@"截取的Sid: %@",sid);
    //    NSLog(@"截取的Skey :%@",skey);
    //    NSLog(@"生成的sign2 :%@",[[CJMD5 md5:mdStr]uppercaseString]);
    
    return [[CJMD5 md5:mdStr]uppercaseString];
}
#pragma mark 生成时间戳
+(NSString*)MakeUnixTime
{
    NSDate *date=[NSDate dateWithTimeIntervalSinceNow:0];
    
    NSTimeInterval time=[date timeIntervalSince1970];
    
    NSString *strTime=[NSString stringWithFormat:@"%.0f",time];
    
    return strTime;
}

#pragma mark 生成MD5加密的请求
-(ASIFormDataRequest*)MakeMD5Request:(NSString*)_shortUrl andRequestTimeOut:(NSInteger)_time
{
    NSString* urlStr = [NSString stringWithFormat:@"%@%@",SERVE_URL,_shortUrl];
    
    ASIFormDataRequest* request = [[ASIFormDataRequest alloc]initWithURL:[NSURL URLWithString:urlStr]];
    NSString* sid = [[NSUserDefaults standardUserDefaults]objectForKey:@"UID"];
    
    NSString* sign = [TodoHttpManager MakeSignMethod:_shortUrl];
    
    NSString* times = [TodoHttpManager MakeUnixTime];
    
    [request setPostValue:sid forKey:@"sid"];
    [request setPostValue:sign forKey:@"sign"];
    [request setPostValue:times forKey:@"time"];
    
    request.timeOutSeconds = _time;
    
    return request;
}


-(void)MakeMyselfAlert:(NSString*)_label andIsNeedTitle:(BOOL)_isTitle andShowTime:(NSInteger)_time
{
    //提示内容
    UILabel* label = [[UILabel alloc]init];
    [label setFont:[UIFont systemFontOfSize:13]];
    [label setNumberOfLines:0];
    [label setTextAlignment:NSTextAlignmentCenter];
    
    CGSize size = CGSizeMake(200,50);
    
    CGSize FontSize = [_label sizeWithFont:label.font constrainedToSize:size lineBreakMode:NSLineBreakByClipping];
    
    CGRect rect = CGRectMake([UIScreen mainScreen].bounds.size.width/2, ([UIScreen mainScreen].bounds.size.height-64)/2, 0, 0);
    
    rect.size = FontSize;
    
    [label setFrame:rect];
    
    [label setText:_label];
    
    [label setTextColor:[UIColor whiteColor]];
    
    [label setCenter:CGPointMake([UIScreen mainScreen].bounds.size.width/2, _isTitle?[UIScreen mainScreen].bounds.size.height/2+8+70:[UIScreen mainScreen].bounds.size.height/2+70)];
    
    //背景veiw
    UIView* backgroudView = [[UIView alloc]init];
    [backgroudView setBackgroundColor:[UIColor blackColor]];
    
    [backgroudView setFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/2, ([UIScreen mainScreen].bounds.size.height-64)/2, label.frame.size.width+20,_isTitle?label.frame.size.height+30:label.frame.size.height+20)];
    [backgroudView setCenter:CGPointMake([UIScreen mainScreen].bounds.size.width/2, [UIScreen mainScreen].bounds.size.height/2+70)];
    
    backgroudView.layer.masksToBounds = YES;
    backgroudView.layer.cornerRadius = 5;
    
    if (_isTitle)
    {
        //提示标题
        UILabel* title = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 50, 20)];
        
        [title setFont:[UIFont systemFontOfSize:14]];
        [title setText:@"提示"];
        [title setTextColor:[UIColor whiteColor]];
        [title setCenter:CGPointMake(backgroudView.frame.size.width/2, 13)];
        [title setTextAlignment:NSTextAlignmentCenter];
        [backgroudView addSubview:title];
    }
    
    
    //window
    UIWindow *window=[UIApplication sharedApplication].keyWindow;
    
    [window addSubview:backgroudView];
    [window addSubview:label];
    
    //出现时间
    [UIView animateWithDuration:_time animations:^{
        
        [backgroudView setAlpha:0];
        [label setAlpha:0];
        
    } completion:^(BOOL finished)
     {
         [backgroudView removeFromSuperview];
         [label removeFromSuperview];
     }];
}


@end
